import request from '@/utils/request'
import qs from 'qs'

// 获取所有用户
export function getPassenger(data) {
  console.log(data, 40)
  return request({
    url: '/getPassenger/',
    method: 'post',
    data: qs.stringify(data)
  })
}

//  头像上传
export function fileUpload(data) {
  console.log(data, 40)
  return request({
    url: '/fileUpload/',
    method: 'post',
    data: data
  })
}

// 编辑用户信息信息
export function geteditUser(data) {
  console.log(data, 46)
  return request({
    url: '/geteditUser/',
    method: 'post',
    data: qs.stringify(data)
  })
}

// 删除用户
export function getDeleteUser(data) {
  console.log(data, 40)
  return request({
    url: '/getDeleteUser/',
    method: 'get',
    params: { data }
  })
}

// 锁定用户
export function getLockUser(data) {
  console.log(data, 40)
  return request({
    url: '/getLockUser/',
    method: 'get',
    params: { data }
  })
}

// 用户的消费记录
export function getuserRecord(data) {
  console.log(data, 46)
  return request({
    url: '/getuserRecord/',
    method: 'get',
    params: data
  })
}

// 用户的消费记录
export function getComplaint(data) {
  console.log(data, 66)
  return request({
    url: '/getComplaint/',
    method: 'get',
    params: data
  })
}

// 用户的批量删除
export function getRemoves(data) {
  console.log(data, 66)
  return request({
    url: '/getRemoves/',
    method: 'get',
    params: data
  })
}

// 用户的搜索
export function searchPs(data) {
  console.log(data, 66)
  return request({
    url: '/searchPs/',
    method: 'post',
    data: qs.stringify(data)
  })
}
